package com.cn.daifaming.demoservice.resource;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.cn.daifaming.demoservice.domain.SignupReq;
import com.cn.daifaming.demoservice.service.UserInfoService;

/**
 * @author Administrator
 *
 */
@Component
@Path("/user")
public class UserInfoResource
{
	@Autowired
	private UserInfoService userInfoService;

	@POST
	@Path("/signup")
	@Produces(MediaType.APPLICATION_JSON)
	@Consumes(MediaType.APPLICATION_JSON)
	public void insert(SignupReq signupReq)
	{
		// userInfoService = (UserInfoService) SpringContextUtil
		// .getBean("userInfoService");
		userInfoService.insert(signupReq);
	}
}
